package com.dai.spec.common.enums;

/**
 * 开课类型枚举
 */
public enum DeliveryType {


    ONLINE("0","线上"),
    OFFLINE("1","线下");


    private String code;
    private String value;

    DeliveryType(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
    public  static String getValueByCode(String code){
        for (DeliveryType deliveryTypeEnum : DeliveryType.values()) {
            if (deliveryTypeEnum.getCode().equals(code)){
                return deliveryTypeEnum.getValue();
            }
        }
        return null;
    }
}
